﻿@model VisaApp.Models.EmailResModel
@{  AjaxOptions ajaxOptsEmailRes = new AjaxOptions
    {
        HttpMethod = "post",
        OnComplete = "completedAjaxRequestForEmailRes"
    };
}
<script type="text/javascript">

    function completedAjaxRequestForEmailRes(obj) {
        var returnObj = eval('(' + obj.responseText + ')');
        if (returnObj.Status == "success") {
            $("#txtEmailBottom").val("");
            alert("Bạn đã đăng ký thành công nhân Email thông tin về visa ");
        } else {
            alert(returnObj.Message);
        }
        return false;
    }
</script>
@using (Ajax.BeginForm("EmailRes", "News", null, ajaxOptsEmailRes, new { enctype = "multipart/form-data", name = "frm_register-visa", id = "frm_register-visa" }))
{
    <div class="inputEmail">
        <i class="iconInput"></i>
        @Html.TextBoxFor(model => model.Email, new {@id="txtEmailBottom", @class="ipEmail", @placeholder="Đăng ký email nhận tin về visa" })
        <input type="submit" class="green" id="aBtnEmail_Bottom" value="Gửi" />
    </div>
}